package chaoyue.study.bean;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import lombok.Data;

/**
 * JPA 实体类配置
 */
@Data
@Entity
@JsonIgnoreProperties({"hibernateLazyInitializer","handler","fieldHandler"})// 处理JPA延迟加载代理类中的属性内容，忽略掉这些字段防止json序列化出现问题
public class Depart {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY) // 设置ID自动递增
    private Integer id;
    private String name;
}
